package com.fita.entity.coupon;

import com.demo2do.core.utils.Alias;

/**
 * 优惠券状态
 * 
 * @author LZJ
 */
@Alias("couponStatus")
public enum CouponStatus {

    UNCLAIMED("已生成", "default"),

    CLAIMED("已认领", "success"),   // 用户已认领了优惠券
    
    OCCUPIED("已占领", "occupied"),  // 用户将优惠券用于订单，但订单并未支付

    USED("已使用", "default"),

    OUT_OFF_DATE("已过期", "default"),
    
    HOLD("已冻结", "default");

    private String description;

    private String css;

    /**
     * @param description
     */
    CouponStatus(String description, String css) {
        this.description = description;
        this.css = css;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the css
     */
    public String getCss() {
        return css;
    }
    
    /**
     * 
     * @return
     */
    public boolean isUnclaimed() {
        return this.equals(UNCLAIMED);
    }
    
    public boolean isOutOffDate() {
    	
    	return this.equals(OUT_OFF_DATE);
    }
    
    /**
     * 
     * @return
     */
    public boolean isClaimed() {
        return this.equals(CLAIMED);
    }
    
    public boolean isOccupied() {
        return this.equals(OCCUPIED);
    }
    
    public boolean isUsed() {
        return this.equals(USED);
    }
    
    /**
     * 
     * @return
     */
    public boolean isHold() {
        return this.equals(HOLD);
    }
}
